Optimal. Leaf size=130 \[ \frac{\left (2 a^2-b^2\right ) \csc ^4(c+d x)}{4 d}-\frac{\left (a^2-2 b^2\right ) \csc ^2(c+d x)}{2 d}-\frac{a^2 \csc ^6(c+d x)}{6 d}-\frac{2 a b \csc ^5(c+d x)}{5 d}+\frac{4 a b \csc ^3(c+d x)}{3 d}-\frac{2 a b \csc (c+d x)}{d}+\frac{b^2 \log (\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.158191, antiderivative size = 130, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.103, Rules used = {2837, 12, 948} \[ \frac{\left (2 a^2-b^2\right ) \csc ^4(c+d x)}{4 d}-\frac{\left (a^2-2 b^2\right ) \csc ^2(c+d x)}{2 d}-\frac{a^2 \csc ^6(c+d x)}{6 d}-\frac{2 a b \csc ^5(c+d x)}{5 d}+\frac{4 a b \csc ^3(c+d x)}{3 d}-\frac{2 a b \csc (c+d x)}{d}+\frac{b^2 \log (\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2837
Rule 12
Rule 948
Rubi steps
\begin{align*} \int \cot ^5(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2 \, dx &=\frac{\operatorname{Subst}\left (\int \frac{b^7 (a+x)^2 \left (b^2-x^2\right )^2}{x^7} \, dx,x,b \sin (c+d x)\right )}{b^5 d}\\ &=\frac{b^2 \operatorname{Subst}\left (\int \frac{(a+x)^2 \left (b^2-x^2\right )^2}{x^7} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac{b^2 \operatorname{Subst}\left (\int \left (\frac{a^2 b^4}{x^7}+\frac{2 a b^4}{x^6}+\frac{-2 a^2 b^2+b^4}{x^5}-\frac{4 a b^2}{x^4}+\frac{a^2-2 b^2}{x^3}+\frac{2 a}{x^2}+\frac{1}{x}\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac{2 a b \csc (c+d x)}{d}-\frac{\left (a^2-2 b^2\right ) \csc ^2(c+d x)}{2 d}+\frac{4 a b \csc ^3(c+d x)}{3 d}+\frac{\left (2 a^2-b^2\right ) \csc ^4(c+d x)}{4 d}-\frac{2 a b \csc ^5(c+d x)}{5 d}-\frac{a^2 \csc ^6(c+d x)}{6 d}+\frac{b^2 \log (\sin (c+d x))}{d}\\ \end{align*}
Mathematica [A] time = 0.165615, size = 107, normalized size = 0.82 \[ \frac{15 \left (2 a^2-b^2\right ) \csc ^4(c+d x)-30 \left (a^2-2 b^2\right ) \csc ^2(c+d x)-10 a^2 \csc ^6(c+d x)-24 a b \csc ^5(c+d x)+80 a b \csc ^3(c+d x)-120 a b \csc (c+d x)+60 b^2 \log (\sin (c+d x))}{60 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.095, size = 196, normalized size = 1.5 \begin{align*} -{\frac{{a}^{2} \left ( \cos \left ( dx+c \right ) \right ) ^{6}}{6\,d \left ( \sin \left ( dx+c \right ) \right ) ^{6}}}-{\frac{2\,ab \left ( \cos \left ( dx+c \right ) \right ) ^{6}}{5\,d \left ( \sin \left ( dx+c \right ) \right ) ^{5}}}+{\frac{2\,ab \left ( \cos \left ( dx+c \right ) \right ) ^{6}}{15\,d \left ( \sin \left ( dx+c \right ) \right ) ^{3}}}-{\frac{2\,ab \left ( \cos \left ( dx+c \right ) \right ) ^{6}}{5\,d\sin \left ( dx+c \right ) }}-{\frac{16\,ab\sin \left ( dx+c \right ) }{15\,d}}-{\frac{2\,ab\sin \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{5\,d}}-{\frac{8\,ab\sin \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{15\,d}}-{\frac{{b}^{2} \left ( \cot \left ( dx+c \right ) \right ) ^{4}}{4\,d}}+{\frac{{b}^{2} \left ( \cot \left ( dx+c \right ) \right ) ^{2}}{2\,d}}+{\frac{{b}^{2}\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.988596, size = 146, normalized size = 1.12 \begin{align*} \frac{60 \, b^{2} \log \left (\sin \left (d x + c\right )\right ) - \frac{120 \, a b \sin \left (d x + c\right )^{5} - 80 \, a b \sin \left (d x + c\right )^{3} + 30 \,{\left (a^{2} - 2 \, b^{2}\right )} \sin \left (d x + c\right )^{4} + 24 \, a b \sin \left (d x + c\right ) - 15 \,{\left (2 \, a^{2} - b^{2}\right )} \sin \left (d x + c\right )^{2} + 10 \, a^{2}}{\sin \left (d x + c\right )^{6}}}{60 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.80379, size = 448, normalized size = 3.45 \begin{align*} \frac{30 \,{\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{4} - 15 \,{\left (2 \, a^{2} - 7 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 10 \, a^{2} - 45 \, b^{2} + 60 \,{\left (b^{2} \cos \left (d x + c\right )^{6} - 3 \, b^{2} \cos \left (d x + c\right )^{4} + 3 \, b^{2} \cos \left (d x + c\right )^{2} - b^{2}\right )} \log \left (\frac{1}{2} \, \sin \left (d x + c\right )\right ) + 8 \,{\left (15 \, a b \cos \left (d x + c\right )^{4} - 20 \, a b \cos \left (d x + c\right )^{2} + 8 \, a b\right )} \sin \left (d x + c\right )}{60 \,{\left (d \cos \left (d x + c\right )^{6} - 3 \, d \cos \left (d x + c\right )^{4} + 3 \, d \cos \left (d x + c\right )^{2} - d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.2441, size = 181, normalized size = 1.39 \begin{align*} \frac{60 \, b^{2} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) - \frac{147 \, b^{2} \sin \left (d x + c\right )^{6} + 120 \, a b \sin \left (d x + c\right )^{5} + 30 \, a^{2} \sin \left (d x + c\right )^{4} - 60 \, b^{2} \sin \left (d x + c\right )^{4} - 80 \, a b \sin \left (d x + c\right )^{3} - 30 \, a^{2} \sin \left (d x + c\right )^{2} + 15 \, b^{2} \sin \left (d x + c\right )^{2} + 24 \, a b \sin \left (d x + c\right ) + 10 \, a^{2}}{\sin \left (d x + c\right )^{6}}}{60 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]